package com.elitel.frame.base.controller;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.elitel.frame.base.service.BaseSqlInforService;
import com.elitel.frame.main.entity.BaseSqlinfor;
import com.elitel.frame.main.entity.CodeSystem;
import com.elitel.frame.main.entity.vo.PageResponseVo;

@Controller
@RequestMapping("/system/basesqlinfor")
public class BaseSqlnforController {

	@Resource
	private BaseSqlInforService baseSqlInforServiceImpl;
	
	@RequestMapping("/selectsql")
	@ResponseBody
	public PageResponseVo<BaseSqlinfor> selectSqlInfor(HttpServletRequest request){
		PageResponseVo<BaseSqlinfor> pageResponseVo = new PageResponseVo<>();
		List<BaseSqlinfor> list = baseSqlInforServiceImpl.selectSqlByCreateTime();
		int count = baseSqlInforServiceImpl.selectCount();
		pageResponseVo.setRows(list);
		pageResponseVo.setTotal(count);
		return pageResponseVo;
	}
}
